<template>
  <div class="app">
    <van-nav-bar
      title="cs-2005"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    />
    <router-view />
    <van-tabbar v-model="active">
      <van-tabbar-item
        icon="home-o"
        to="/home"
      />
      <van-tabbar-item
        icon="friends-o"
        to="/friends"
      />
      <van-tabbar-item
        icon="cart-o"
        to="/crat"
      />
      <van-tabbar-item
        icon="search"
        to="/search"
      />
    </van-tabbar>
  </div>
</template>
<script>
export default {
  data: () => ({
    active: 0
  }),
  methods: {
    onClickLeft() {
      this.$router.go(-1)
    }
  }
}
</script>
<style lang="less" scoped>
</style>
